package progress.exa5;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class BufferedReaderStudy {

    public static void main(String[] args) throws IOException {
        bufferedReader();
    }

    public static void bufferedReader() throws IOException {
        BufferedReader bufferedReader = null;
        try{
            bufferedReader = new BufferedReader(new FileReader("麻子.txt"));
            while (true) {
                String str = bufferedReader.readLine();
                if(str==null){
                    break;
                }
                System.out.println(str);
            }
        }catch (Exception e) {
            e.printStackTrace();
        }finally {
            if(bufferedReader!=null) {
                bufferedReader.close();
            }
        }
    }
}
